import { Roles } from '@/models/user-info'
import { RouteRecordRaw } from 'vue-router'

export interface AppRouteRecordRaw
  extends Omit<RouteRecordRaw, 'meta' | 'children'> {
  meta?: {
    // 当子菜单显示数量只有一条时，也需把子菜单显现
    aways?: boolean
    // 排序，越小越在前
    sort?: number
    // 标题
    title: string
    // 图标
    icon?: string
    roles?: Roles
    // 是否在菜单栏隐藏
    hideInMenu?: boolean
  }
  children?: AppRouteRecordRaw[]
}
export type AppRouteRecord = Array<AppRouteRecordRaw>
